<div class="bg-light lter b-b wrapper-sm">
	<h1 class="m-n font-thin h4">货物管理</h1>
</div>
<div class="wrapper-sm" >
	<uib-tabset active="4" class="tab-container" >
		<uib-tab heading="基本信息" ui-sref="app.client.client_edit">
			<uib-progressbar value="20" class="progress-xs" type="success"></uib-progressbar>
		</uib-tab>
		<uib-tab heading="客户代表"  select="steps.percent=35" ui-sref="app.client.customerrepresentative_manage"></uib-tab>
		<uib-tab heading="货物分类" select="steps.percent=45" ui-sref="app.client.goodstype_manage"></uib-tab>
		<uib-tab heading="货物"  index="4" select="steps.percent=55" ui-sref="app.client.goods_manage" >
			<form name="step4" id="goodsForm" class="form-validation form-horizontal" novalidate ng-controller="goodsManagentController">
				<uib-progressbar value="steps.percent" class="progress-xs" type="success"></uib-progressbar>
				<div class="wrapper-sm ">
					<div class="panel panel-default">
						<div class="panel-heading font-bold">查询	</div>
						<div class="panel-body">
							<label class="control-label pull-left m-l m-r">客户单位</label>
							<div class="col-md-6 form-group m-l m-r">
								<label class="control-label pull-left m-l m-r">{{clientName}}</label>
							</div>
							<div class="line line-xs pull-in"></div>
							<label class="control-label pull-left m-l m-r">货物名称</label>
							<div class="col-md-2 form-group m-l m-r">
								<input id="goods_name" type="text" class="form-control input-sm" name="name" ng-model="queryTerms.name" placeholder="请输入货物名称">
							</div>
							<label class="control-label pull-left m-l m-r">货物分类</label>
							<div class="col-md-2 form-group">
								<select id="goods_levels" class="form-control input-sm" ng-model="queryTerms.categoryId" ng-options="x.id as x.name for x in categoryTypeDropDown" name="Levels">
                                    <option value="">全部</option>
                                </select>
							</div>
							<button id="goods_query" ng-click="queryFunc()" class="btn btn-sm btn-default btn-addon m-l" ng-class="{'disabled':querying}" ng-disabled="querying">
                                <i class="fa fa-search" ng-show="!querying"></i>
                                <i class="fa fa-spinner no-bordr" ng-show="querying" ng-class="{'fa-spin':querying}"></i>
                                <span ng-show="!querying">查询</span>
                                <span ng-show="querying">查询中...</span>
                            </button>
						</div>
					</div>
					<div class="panel panel-default">
						<div class="panel-heading">
							货物列表
						</div>
						<div class="table-responsive">
							<div ui-grid="gridOptions" ui-grid-pagination ui-grid-auto-resize ui-grid-resize-columns style="height:{{heightA}}px; min-height:395px; overflow-y:hidden; min-width:1000px;">
								<div class="watermark" ng-if="!gridOptions.data.length">暂无数据</div>
							</div>
						</div>
					</div>
					<button id="goods_add" data-toggle="modal" data-target="#goods" class="pull-right-xs btn btn-sm m-b-xs btn-info btn-addon " ng-click="addGoods()"><i class="fa fa-plus"></i>添加</button>
					<!-- Modal -->
					<div class="modal fade bs-example-modal-lg" id="goods" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static">
						<div class="modal-dialog modal-lg">
							<div class="modal-content">
								<div class="modal-header">
									<button id="goods_dismiss" type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
									<h4 class="modal-title" id="myModalLabel">{{title}}</h4>
								</div>
								<div class="modal-body">
									<div class="form-group">
										<label class="col-lg-3 control-label">货物名称<span class="text-danger">*</span></label>
										<div class="col-lg-4">
											<input id="goods_nameBox" type="text" class="form-control" ng-model="detail.name" required placeholder="请填写货物名称" name="nameBox">
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-3 control-label">产品代号</label>
										<div class="col-lg-4">
											<input id="goods_productCode" type="text" class="form-control " ng-model="detail.productCode" placeholder="请填写产品代号" name="productCode">
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-3 control-label">货物类别<span class="text-danger">*</span></label>
										<div class="col-lg-3">
											<select id="goods_categoryId" class="form-control" ng-model="detail.categoryId" ng-options="x.id as x.name for x in categoryTypeDropDown" name="categoryIdBox"
												required>
                                                <option value="">请选择</option>
                                            </select>
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-3 control-label">辅助工具</label>
										<div class="col-lg-4">
											<input id="goods_auxiliaryTool" type="text" class="form-control " ng-model="detail.auxiliaryTool" placeholder="请填写辅助工具" name="auxiliaryTool">
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-3 control-label">包装方式</label>
										<div class="col-lg-4">
											<input id="goods_packageMethod" type="text" class="form-control " ng-model="detail.packageMethod" placeholder="请填写包装方式" name="packageMethod">
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-3 control-label">毛重换算率</label>
										<div class="col-lg-4">
											<input id="goods_gwRate" type="text" ng-pattern="/^[0-9]+(.[0-9]{1,4})?$/" class="form-control " ng-model="detail.gwRate" placeholder="请填写毛重换算率" name="gwRate">
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-3 control-label">货物尺寸(长)</label>
										<div class="col-lg-4">
											<input id="goods_length" type="text" ng-pattern="/^[0-9]+(.[0-9]{1,4})?$/" class="form-control " ng-model="detail.length" name="length" placeholder="请填写货物尺寸(长)"
												name="length">
										</div>
										<div class="m-l-n-md m-t-sm">MM</div>
									</div>
									<div class="form-group">
										<label class="col-lg-3 control-label">(宽)</label>
										<div class="col-lg-4">
											<input id="goods_width" type="text" ng-pattern="/^[0-9]+(.[0-9]{1,4})?$/" class="form-control " ng-model="detail.width" name="width" placeholder="请填写货物尺寸(宽)"
												name="width">
										</div>
										<div class="m-l-n-md m-t-sm">MM</div>
									</div>
									<div class="form-group">
										<label class="col-lg-3 control-label">(高)</label>
										<div class="col-lg-4">
											<input id="goods_height" type="text" ng-pattern="/^[0-9]+(.[0-9]{1,4})?$/" class="form-control " ng-model="detail.height" name="height" placeholder="请填写货物尺寸(高)"
												name="height">
										</div>
										<div class="m-l-n-md m-t-sm">MM</div>
									</div>
									<div class="form-group">
										<label class="col-lg-3 control-label">货物容量</label>
										<div class="col-lg-4">
											<input id="goods_volume" type="text" class="form-control " ng-model="detail.volume" placeholder="请填写货物容量" name="volume">
										</div>
										<div class="m-l-n-md m-t-sm">L</div>
									</div>
									<div class="form-group">
										<label class="col-lg-3 control-label">货物重量</label>
										<div class="col-lg-4">
											<input id="goods_weight" type="text" ng-pattern="/^[0-9]+(.[0-9]{1,4})?$/" class="form-control " ng-model="detail.weight" placeholder="请填写货物重量" name="weight">
										</div>
										<div class="col-lg-2 m-l-n-md">
											<select class="form-control" id="goods_weightUnit" ng-model="detail.weightUnit" name="weightUnit" ng-options="x.value as x.text for x in weightUnitDropDown">
                                                <option value="">请选择</option>
                                            </select>
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-3 control-label">货物规格</label>
										<div class="col-lg-4">
											<input id="goods_goodNorms" type="text" class="form-control " ng-model="detail.goodNorms" placeholder="请填写货物规格" name="goodNorms">
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-3 control-label">赔偿方式</label>
										<div class="col-lg-4">
											<input id="goods_compensation" type="text" class="form-control " ng-model="detail.compensation" placeholder="请填写赔偿方式" name="compensation">
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-3 control-label">备注</label>
										<div class="col-lg-4">
											<textarea class="form-control" ng-model="detail.remarks" placeholder="请再次填写备注" name="remarks"></textarea>
										</div>
									</div>
								</div>
								<div class="modal-footer">
									<button  id="goods_miss" type="button" class="btn btn-default" data-dismiss="modal">取消</button>
									<button id="goods_save" type="button" class="btn btn-primary" ng-click="detail.click()">保存</button>
								</div>
							</div>
						</div>
					</div>
				</div>
			</form>
		</uib-tab>
		<uib-tab heading="结算方"  select="steps.percent=65" ui-sref="app.client.settleManagent"></uib-tab>
		<uib-tab heading="线路报价"  select="steps.percent=75" ui-sref="app.client.lineprice_manage"></uib-tab>
		<uib-tab heading="工程"  select="steps.percent=85" ui-sref="app.client.projectManagent"></uib-tab>
		<uib-tab heading="客户资料"	 select="steps.percent=100" ui-sref="app.client.clientinfo_manage"></uib-tab>
		<uib-tab heading="对账回款周期" select="steps.percent=100" ui-sref="app.client.returnPeriod"></uib-tab>
	</uib-tabset>
</div>